<template>
    <div class="blank"></div>
    <Form v-if="pForm" :instance="pForm">
        <div class="blank"></div>
        <div class="apppadding">
            <Button @click="add" size="large" type="primary">完成</Button>
        </div>
    </Form>
</template>

<script lang="ts" setup>
import Form from "@m/components/public/b_form.vue";
import { Rolefrom } from "@b/index/role";
import { useRouter } from "vue-router";
import { Button } from "vant";
const router = useRouter()
const pForm = new Rolefrom()

pForm.init()
const add = async () => {
    const res = await pForm?.updateData()
    if (res) {
        router.back()
    }
}
</script>